

package com.l2qq.vben;

import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import com.jfinal.kit.Ret;
import com.l2qq.admin.login.LoginService;
import com.l2qq.common.kit.SaTokenKit;

import com.l2qq.common.model.Account;


/**
 * 登录控制层
 */
@Path(value = "/user")
public class UserController extends Controller {

    @Inject
    LoginService loginService;


    public void info() {
        Ret r = Ret.ok();
        // 直接获取账户信息
        //Account account = (Account) StpUtil.getTokenSession().get("loginAccount");
        Account account = SaTokenKit.getLoginAccount();

        // 使用账户信息...
        renderJson(r.set("data", account));
    }


}


